<!DOCTYPE html>
<html>
<head>
  <title>Button</title>
  <script src="../../kontra.js"></script>
</head>
<body>
  <canvas id="game" width="600" height="400" style="background: #333331"></canvas>
  <script id="code">
    // initialize the game and setup the canvas
    kontra.init();

    // initialize pointer events
    kontra.initPointer();

    // create a basic button
    window.button = kontra.Button({
      x: 300,
      y: 200,
      anchor: {x: 0.5, y: 0.5},

      // pass any options that kontra.Text accepts
      text: {
        color: 'white',
        text: 'My Button',
        font: '32px Arial',
        anchor: {x: 0.5, y: 0.5}
      }
    });

    // render the button
    button.render();
  </script>
  <script src="../prism/codeOutput.js"></script>
</body>
</html>